<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择器的权重与继承</title>
    <style>
        /* 
          继承的样式的权重小于其他任何形式的权重
        
         */
         *{
             color:violet
         }

         div{
             color:teal
         }
    </style>
</head>
<body>
    <div>
        <!-- 虽然span会从div那里继承color的属性但是由于继承的权重太低
             一旦设置了全局选择器就容易被替代
        -->
        <span>1111</span>
    </div>
</body>
</html>